package com.neusoft.neuiotms.dcom.service;

import java.io.InputStream;
import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.neusoft.bizcore.auth.common.bean.UserBean;
import com.neusoft.bizcore.web.support.Searchable;
import com.neusoft.neuiotms.dcom.dto.WorkDailyDTO;

public interface WorkDailyService {

    List<WorkDailyDTO> index(Searchable searchable, UserBean userBean);

    Page<WorkDailyDTO> search(Pageable pageable, Searchable searchable, UserBean userBean);

    WorkDailyDTO create(WorkDailyDTO dto);

    WorkDailyDTO update(Long id, WorkDailyDTO dto);

    WorkDailyDTO details(Long id);

    void delete(Long id);

    Workbook export(Searchable searchable, final UserBean userBean);

    //    List<InstitutionsDTO> unstartdInstitutions();

    Map<String, Long> reportStats(Date date);

    void importExcel(InputStream fileStream, UserBean user);

    Workbook template(UserBean user);

    Page<Map<String, Object>> report(Pageable pageable, String username, Date start, Date end);

    Workbook exportReport(String username, Date start, Date end);

    /**
     * 总服务时长
     *
     * @param userBean
     * @return
     */
    long serviceTimeTotal(UserBean userBean);

    /**
     * 检查日报提醒
     */
    void checkDailyReportNotice();

    /**
     * 获取一线工程师在特定范围内的服务统计
     *
     * @param year 工作总结年份
     * @param questionnaireType 工作总结类型
     * @return
     */
    List<Map<String, Object>> getServiceSummaryOfWorker(int year, String questionnaireType, UserBean user);
}
